import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// router路由
import router from './router'
// 动态加载条
import '@/router/permission'
// element plus
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
// element 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)

// 使用路由
app.use(router)

// 循环注册element所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
    .$nextTick(() => {
        postMessage({payload: 'removeLoading'}, '*')
    }).then();
